import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";

const routes: Array<RouteRecordRaw> = [
  {
    path: "/",
    redirect: "/login",
  },
  {
    path: "/home",
    component: () => import("../views/home/index.vue"),
    children: [
      {
        path: "/home",
        redirect: "/home/1",
      },
      {
        path: "/home/1",
        component: () => import("../views/shouye/index.vue"),
      },
      {
        path: "/home/2-1",
        component: () => import("../views/yiyuanliebiao/index.vue"),
      },
      {
        path: "/home/3-1",
        component: () => import("../views/yimiaozixun/index.vue"),
      },
      {
        path: "/home/3-2",
        component: () => import("../views/yuyueshenqing/index.vue"),
      },
      {
        path: "/home/3-3",
        component: () => import("../views/wodeyuyue/index.vue"),
      },
      {
        path: "/home/4-1",
        component: () => import("../views/yuyueliebiao/index.vue"),
      },
      {
        path: "/home/4-2",
        component: () => import("../views/yijiezhongliebiao/index.vue"),
      },
      {
        path: "/home/4-3",
        component: () => import("../views/yonghumanyi/index.vue"),
      },
      {
        path: "/home/gerenzhongxin",
        component: () => import("../views/gerenzhongxin/index.vue"),
      }
    ],
  },
  {
    path: "/login",
    component: () => import("../views/login/index.vue"),
  },
  {
    path: "/register",
    component: () => import("../views/register/index.vue"),
  },
  
  // {
  //   path: "/about",
  //   name: "About",
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () =>
  //     import(/* webpackChunkName: "about" */ "../views/About.vue"),
  // },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
